<?php
class Staticizer_Index_Headline extends Staticizer
{
    public function Build($param=NULL)
    {
        #获取数据
        $data=DB::GetRows('select ID,Thumbnail,Title,Content,M_HTMLFile from News where M_IsHeadline=TRUE order by M_IsHeadline_Datetime desc limit 0,1');

        #处理数据
        $data[0]['Thumbnail']=Config::PATH_RELATIVE_ATTACHMENT_NEWS.'/'.$data[0]['Thumbnail'];
        $data[0]['M_HTMLFile']=Config::PATH_RELATIVE_CONTENT_NEWS.'/'.$data[0]['M_HTMLFile'];        

        #绑定数据
        View::Assign('News',$data[0]);

        #生成静态
        $this->Save('index/news.headline.html',View::Fetch('index/news.headline.tpl'));
    }
}
?>